package com.yuzhitong.shapi.bean;

import com.flyco.tablayout.listener.CustomTabEntity;

import java.util.List;

/**
 * Created by Brsya
 * CreateDate: 2022/5/8  14:33
 * Description:
 * 分类
 */
public class CategoryBean {

    private int id;
    private String code;
    private int parentId;
    private String categoryName;
    private String iconId;
    private List<ChailDTO> chail;

    public int getId() { return id;}

    public void setId(int id) { this.id = id;}

    public String getCode() { return code;}

    public void setCode(String code) { this.code = code;}

    public int getParentId() { return parentId;}

    public void setParentId(int parentId) { this.parentId = parentId;}

    public String getCategoryName() { return categoryName;}

    public void setCategoryName(String categoryName) { this.categoryName = categoryName;}

    public String getIconId() { return iconId;}

    public void setIconId(String iconId) { this.iconId = iconId;}

    public List<ChailDTO> getChail() { return chail;}

    public void setChail(List<ChailDTO> chail) { this.chail = chail;}

    public static class ChailDTO implements CustomTabEntity {
        private int id;
        private String code;
        private int parentId;
        private String categoryName;
        private String iconId;
        private List<ChailDTO> chail;

        public int getId() { return id;}

        public void setId(int id) { this.id = id;}

        public String getCode() { return code;}

        public void setCode(String code) { this.code = code;}

        public int getParentId() { return parentId;}

        public void setParentId(int parentId) { this.parentId = parentId;}

        public String getCategoryName() { return categoryName;}

        public void setCategoryName(String categoryName) { this.categoryName = categoryName;}

        public String getIconId() { return iconId;}

        public void setIconId(String iconId) { this.iconId = iconId;}

        @Override
        public String getTabTitle() {
            return categoryName;
        }

        @Override
        public int getTabSelectedIcon() {
            return 0;
        }

        @Override
        public int getTabUnselectedIcon() {
            return 0;
        }

        public List<ChailDTO> getChail() { return chail;}

        public void setChail(List<ChailDTO> chail) { this.chail = chail;}
    }
}
